# coding=utf-8

import os
from generator.cpp.file_type import CHeader
import datetime



def gen_share_version_h(outDir:str):
    now = datetime.datetime.now()
    
    (year,day,weekday)=now.isocalendar()
    hour = now.hour
    minute=now.minute
    version = str(year%200)+str(day)+str(weekday)+str(hour)+(str(minute) if minute >=10 else "0"+str(minute))
    header=CHeader("SHAREELEMENT")
    version = "231941025"
    header.define("rpcversion {}".format(version))
    header.toFile(os.path.join(outDir,"include/vp"),"SHAREELEMENT.h")



